home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #3 / amigamamagazinepolishissue1998.iso / maksiu / lists / amoslist-0996.lzh / AMOSLIST / 000051_amos-request@svcs1.digex.net_Tue Sep 24 11:08:07 1996.msg < prev    next >
Internet Message Format  |  1996-10-01  |  2KB

  1. Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224]) by mail2.access.digex.net (8.7.6/8.7.3) with ESMTP id LAA29845 for <mcox@access.digex.net>; Tue, 24 Sep 1996 11:08:05 -0400 (EDT)
  2. Received: (from daemon@localhost) by svcs1.digex.net (8.7.6/8.7.3) id JAA11094 for amos-out; Tue, 24 Sep 1996 09:12:04 -0400 (EDT)
  3. Received: from mail2.access.digex.net (mail2.access.digex.net [205.197.247.3]) by svcs1.digex.net (8.7.6/8.7.3) with ESMTP id JAA11091 for <amos-list@svcs1.digex.net>; Tue, 24 Sep 1996 09:12:03 -0400 (EDT)
  4. Received: from silversurfer.mycom-media.com ([195.40.34.2]) by mail2.access.digex.net (8.7.6/8.7.3) with SMTP id JAA21603 for <amos-list@access.digex.net>; Tue, 24 Sep 1996 09:12:00 -0400 (EDT)
  5. Received: by silversurfer.mycom-media.com with Microsoft Exchange (IMC 4.0.838.14)
  6.     id <01BBAA23.06C14F90@silversurfer.mycom-media.com>; Tue, 24 Sep 1996 14:16:49 +0100
  7. Message-ID: <c=GB%a=_%p=Mycom_Media_Ltd%l=SILVERSURFER-960924131647Z-5@silversurfer.mycom-media.com>
  8. From: Paul Hickman <phickman@mycom-media.com>
  9. To: "'amos-list@access.digex.net'" <amos-list@access.digex.net>
  10. Subject: RE: Dividing hex numbers by 2
  11. Date: Tue, 24 Sep 1996 14:16:47 +0100
  12. X-Mailer:  Microsoft Exchange Server Internet Mail Connector Version 4.0.838.14
  13. MIME-Version: 1.0
  14. Content-Type: text/plain; charset="us-ascii"
  15. Content-Transfer-Encoding: 7bit
  16. Status: RO
  17. X-Status: 
  18.  
  19. >>My AMOS works fine for dividing hex numbers, as you describe, but I only
  20. >>want to divide each digit of the hex number. This is for the screen colours
  21. >>and I want to calculate the half-brite colour. Colour(>31) doesn't work.
  22.  
  23. You have to use masks:
  24.  
  25. R=(OldC And $F00)/$100
  26. G=(OldC And $F0)/$10
  27. B=(OldC And $F)
  28. NewC=(R/2)*$100 + (G/2) *$10 + (B/2)
  29.